package com.community.common.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.community.common.pojo.domain.Menu;
import com.community.common.mapper.MenuMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 页面菜单表 服务实现类
 * </p>
 *
 * @author superman
 * @since 2020-08-19
 */
@Slf4j
@Service
public class MenuService extends ServiceImpl<MenuMapper, Menu> {

    @Resource
    private MenuMapper menuMapper;

    public List<Menu> queryFirstMenu(Integer role) {

        return menuMapper.queryFirstMenu(role);
    }

    public List<Menu> queryChildMenu(Integer roleId, Integer id) {
        return menuMapper.queryChildMenu(roleId,id);
    }

}
